package
{
	import com.component.scroll.GraphHScrollBar;
	import com.component.scroll.GraphVScrollBar;
	import com.component.scroll.HVScrollComponent;
	import com.component.slider.ScaleSlider;
	import com.core.Application;
	
	import flash.display.Graphics;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.system.Security;
	
	[SWF(width = 800, height = 600)]
	public class Main extends Sprite
	{
		private var game:Game;
		public function Main()
		{
			Security.allowDomain("*");
			SSA.initialization();
			initLayer();
			stage.addEventListener(Event.RESIZE, resizeEvent);
			resizeEvent();
			initConfig();
			
			startGame();//测试
		}
		private function initLayer():void {
			var application:Application = SSA.application;
			addChild(application);
			stage.align = flash.display.StageAlign.TOP_LEFT;
			stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
			stage.showDefaultContextMenu = false;
			application.hoverLayer.mouseEnabled = false;
		}
		private function resizeEvent(e:Event = null):void {
			if(stage.stageWidth != 0 || stage.stageHeight != 0){
				SSA.application.resizeSize(stage.stageWidth, stage.stageHeight);
			}
		}
		private function initConfig():void{//初始化配置文件	各种配置路径
		}
		
		private function startGame():void{
			game = new Game();
			game.startup();
		}
	}
}